package vip.youngboy.freejump.service.form;

import org.activiti.engine.runtime.ProcessInstance;
import vip.youngboy.freejump.domain.form.StartFormData;
import vip.youngboy.freejump.domain.form.TaskFormData;
import vip.youngboy.freejump.domain.process.ProcessStartInfo;

public interface FormService {

    /**
     * 获取开始表单
     *
     * @param procDefId 流程定义id
     * @return 流程开启表单数据
     */
    StartFormData getStartFormData(String procDefId);

    /**
     * 通过提交表单开启流程
     *
     * @param processStartInfo 流程启动信息和表单数据
     * @return 流程实例
     */
    ProcessInstance submitStartFormData(ProcessStartInfo processStartInfo);


    /**
     * 获取任务表单
     *
     * @param taskId 任务id
     * @return 任务表单数据
     */
    TaskFormData getTaskFormData(String taskId);

}
